package com.highspeed.bdk.gateway.socket.analyze.message.gui.resolver;

import com.highspeed.bdk.gateway.Util;
import com.highspeed.bdk.gateway.socket.analyze.message.gui.base.MessageResolver;

import java.util.Map;

/**
 * 3.21反馈一条逻辑链路流量消息
 */
public class OneLogicLinkFlowResolver extends MessageResolver {

    @Override
    protected Map doResolveBody(byte[] response) {
        short rionetId = Util.getShort(response, getOffset());
        offset2();
        logger.info("链路起点rionetId......." + rionetId);

        short portId = Util.getShort(response, getOffset());
        offset2();
        logger.info("链路起点portId......." + portId);

        rionetId = Util.getShort(response, getOffset());
        offset2();
        logger.info("链路终点rionetId......." + rionetId);

        portId = Util.getShort(response, getOffset());
        offset2();
        logger.info("链路终点portId......." + portId);

        LogPortStaticsResolver logPortStaticsResolver = new LogPortStaticsResolver();
        logPortStaticsResolver.setContainer(getContainer());
        logPortStaticsResolver.doResolveBody(response);
        logPortStaticsResolver.doResolveBody(response);
        return getContainer();
    }
}
